class Student implements Cloneable{
    int age;

    public Student(int age) {
        this.age = age;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
public class Test {
    public static void fun6(int a) throws MyException {
        if(a==0){
            throw new MyException();
        }
    }

    public static void main(String[] args) {

    }
    public static void fun5(int a){
        try{
            if(a==0){
                throw new RuntimeException("a=0");
            }
        }catch (NullPointerException c){
            System.out.println("捕获异常");
        }finally {
            System.out.println("一定会执行");
        }
        System.out.println("没有捕获到，不会执行");
    }

    public static void main2(String[] args) {
        fun5(0);
    }

    public static void fun() throws CloneNotSupportedException {
        int a=0;
        if(a==0){
            throw new CloneNotSupportedException("a=0");
        }
    }
    public static void main1(String[] args) throws CloneNotSupportedException {
        fun();
    }
}
